package com.lmm.rpc.core.client.protocol;

import lombok.Getter;

/**
 * 请求状态
 * */
public enum MessageStatus {
    SUCCESS((byte)0),
    FAIL((byte)1);

    @Getter
    private final byte code;

    MessageStatus(byte code) {
        this.code = code;
    }

    public static boolean isSuccess(byte code){
        return MessageStatus.SUCCESS.code == code;
    }
}
